<?php

require __DIR__ . '/../vendor/autoload.php';

$app = require_once __DIR__ . '/../bootstrap/app.php';

$app->make(\App\Console\Kernel::class)->bootstrap();

/* ============== Write Codes Below ================= */

\App\Models\Agent::truncate();
\App\Models\AgentUser::truncate();

$agent = new \App\Models\Agent();
$agent->name = '测试代理';
$agent->app_id = 'test';
$agent->app_secret = 'test';
$agent->save();

$agentUser = new \App\Models\AgentUser();
$agentUser->agent_id = $agent->id;
$agentUser->username = 'test';
$agentUser->password = Hash::make('test');
$agentUser->save();
